Organizing Data in a Distributed Storage System

ABSTRACT

A distributed storage system is provided. The distributed storage system includes multiple front-end servers and zones for managing data for clients. Data within the distributed storage system is associated with a plurality of accounts and divided into a plurality of groups, each group including a plurality of splits, each split being associated with a respective account, and each group having multiple tablets and each tablet managed by a respective tablet server of the distributed storage system. Data associated with different accounts may be replicated within the distributed storage system using different data replication policies. There is no limit to the amount of data for an account by adding new splits to the distributed storage system. In response to a client request for a particular account&#39;s data, a front-end server communicates such request to a particular zone that has the client-requested data and returns the client-requested data to the requesting client.

RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application Ser.No. 61/649,806, filed May 21, 2012, entitled “Organizing Data in aDistributed Storage System,” which is incorporated by reference hereinin its entirety.

TECHNICAL FIELD

The disclosed implementations relate generally to the management of adistributed storage system, and in particular, to system and method fororganizing a large volume of data in a distributed storage system.

BACKGROUND

Internet has become a popular venue for people across the globe to storeand exchange information. As the amount of data managed by the Internetrapidly increases, both individually and collectively, and the serviceassociated with the data gets more complicated, it is becoming aconstant challenge for an Internet-based service provider to mange sucha large volume of data and render the associated service efficiently inresponse to different data access requests by users from anywhere in theworld.

SUMMARY

In accordance with some embodiments described below, a method for addingdata to a distributed storage system that includes a plurality ofcomputer servers, each computer server including one or more processorsand memory, is provided. The data within the distributed storage systemis associated with a plurality of accounts and divided into a pluralityof groups, each group including a plurality of splits and each splitbeing associated with a respective account. The method includes:identifying a first split associated with an account, wherein the firstsplit is a member of a first group of splits and the first split has adata range parameter indicating that more data can be added to the firstsplit and a split size indicating an actual amount of data in the firstsplit; in response to determining that the split size of the first splitreaches a predefined limit: updating the data range parameter in thefirst split so that no data can be added to the first split; creating asecond split for the account, wherein the second split includes a datarange parameter indicating that more data can be added to the secondsplit; adding the second split to a second group of splits; andreplicating the second group of splits within the distributed storagesystem in accordance with a data replication policy associated with theaccount.

In accordance with some embodiments described below, a distributedstorage system includes a plurality of zones, each zone including aplurality of computer servers and each computer server including one ormore processors and memory, a plurality of network links that connectstwo respective zones, wherein data within the distributed storage systemis associated with a plurality of accounts and divided into a pluralityof groups, each group including a plurality of splits and each splitbeing associated with a respective account, and a plurality of program,modules, wherein the plurality of program modules are stored in thememory of a respective computer server and to be executed by the one ormore processors of the respective computer server. The plurality ofprogram modules include instructions for: identifying a first splitassociated with an account, wherein the first, split is a member of afirst group of splits and the first split has a data range parameterindicating that more data can be added to the first split and a splitsize indicating an actual amount of data in the first split; in responseto determining that the split size of the first split reaches apredefined limit: updating the data range parameter in the first splitso that no data can be added to the first split; creating a second splitfor the account, wherein the second split includes a data rangeparameter indicating that more data can be added to the second split;adding the second split to a second group of splits; and replicating thesecond group of splits within the distributed storage system inaccordance with a data replication policy associated with the account.

In accordance with some embodiments described below, a non-transitorycomputer readable storage medium stores one or more program modulesconfigured for execution by a computer server that includes one or moreprocessors and memory and is part of a distributed storage system,wherein the distributed storage system is configured for dividing dataassociated with a plurality of accounts into a plurality of groups, eachgroup including a plurality of splits and each split being associatedwith a respective account. The one or more programs include instructionsfor: identifying a first split associated with an account, wherein thefirst split is a member of a first group of splits and the first splithas a data range parameter indicating that more data can be added to thefirst split and a split size indicating an actual amount of data in thefirst split; in response to determining that the split size of the firstsplit reaches a predefined limit: updating the data range parameter inthe first split so that no data can be added to the first split;creating a second split for the account, wherein the second splitincludes a data range parameter indicating that more data can be addedto the second split; adding the second split to a second group ofsplits; and replicating the second group of splits within thedistributed storage system in accordance with a data replication policyassociated with the account.

In accordance with some embodiments described below, a method forreplicating data within a distributed storage system that includes aplurality of computer servers, each computer server including one ormore processors and memory, is provided. The data within the distributedstorage system is associated with a plurality of accounts and dividedinto a plurality of groups, each group including a plurality of splitsand each split being associated with a respective account. The methodincludes: dividing data associated with a first account and dataassociated with a second account into a first set of splits and a secondset of splits, respectively, wherein the first account and the secondaccount have different data replication policies; adding each of thefirst set of splits and the second set of splits to a respective groupof splits, wherein there is no group including a member of the first setof splits and a member of the second set of splits; creating apredefined number of replicas for each group of splits that includes amember of the first set of splits and allocating the replicas within thedistributed storage system in accordance with a data replication policyassociated with the first account; and creating a predefined number ofreplicas for each group of splits that includes a member of the secondset of splits and allocating the replicas within the distributed storagesystem in accordance with a data replication policy associated with thesecond account.

In accordance with some embodiments described below, a distributedstorage system includes a plurality of zones, each zone including aplurality of computer servers and each computer server including one ormore processors and memory, a plurality of network links that connectstwo respective zones, wherein data within the distributed storage systemis associated with a plurality of accounts and divided into a pluralityof groups, each group including a plurality of splits and each splitbeing associated with a respective account, and a plurality of programmodules, wherein the plurality of program modules are stored in thememory of a respective computer server and to be executed by the one ormore processors of the respective computer server. The plurality ofprogram modules include instructions for: dividing data associated witha first account and data associated with a second account into a firstset of splits and a second set of splits, respectively, wherein thefirst account and the second account have different data replicationpolicies; adding each of the first set of splits and the second set ofsplits to a respective group of splits, wherein there is no groupincluding a member of the first set of splits and a member of the secondset of splits; creating a predefined number of replicas for each groupof splits that includes a member of the first set of splits andallocating the replicas within the distributed storage system inaccordance with a data replication policy associated with the firstaccount; and creating a predefined number of replicas for each group ofsplits that includes a member of the second set of splits and allocatingthe replicas within the distributed storage system in accordance with adata replication policy associated with the second account.

In accordance with some embodiments described below, a non-transitorycomputer readable storage medium stores one or more program modulesconfigured for execution by a computer server that includes one or moreprocessors and memory and is part of a distributed storage system,wherein the distributed storage system is configured for dividing dataassociated with a plurality of accounts into a plurality of groups, eachgroup including a plurality of splits and each split being associatedwith a respective account. The one or more programs include instructionsfor: dividing data associated with a first account and data associatedwith a second account into a first set of splits and a second set ofsplits, respectively, wherein the first account and the second accounthave different data replication policies; adding each of the first setof splits and the second set of splits to a respective group of splits,wherein there is no group including a member of the first set of splitsand a member of the second set of splits; creating a predefined numberof replicas for each group of splits that includes a member of the firstset of splits and allocating the replicas within the distributed storagesystem in accordance with a data replication policy associated with thefirst account; and creating a predefined number of replicas for eachgroup of splits that includes a member of the second set of splits andallocating the replicas within the distributed storage system inaccordance with a data replication policy associated with the secondaccount.

In accordance with some embodiments described below, a method forlocating data within a distributed storage system that includes aplurality of computer servers, each computer server including one ormore processors and memory, is provided. The data within the distributedstorage system is associated with a plurality of accounts and dividedinto a plurality of groups, each group including a plurality of splits,each split being associated with a respective account, and each grouphaving multiple tablets and each tablet managed by a respective tabletserver of the distributed storage system. The method includes: receivinga data access request from a client, wherein the data access requestincludes a logical identifier of data associated with an account;identifying one or more split identifiers associated with the logicalidentifier in accordance with the data access request, wherein eachsplit identifier identifies a split associated with the account; foreach of the identified one or more split identifiers: identifying agroup identifier, wherein the group identifier corresponds to a group ofsplits; selecting one of the multiple tablets associated with theidentified group based on information about the tablet servers managingthe multiple tablets; communicating with the tablet server that managesthe selected tablet for the split corresponding to the split identifier;and receiving the split from the tablet server; and forwarding thesplits from the respective tablet servers to the requesting client.

In accordance with some embodiments described below, a distributedstorage system includes a plurality of zones, each zone including aplurality of computer servers and each computer server including one ormore processors and memory, a plurality of network links that connectstwo respective zones, wherein data within the distributed storage systemis associated with a plurality of accounts and divided into a pluralityof groups, each group including a plurality of splits, each split beingassociated with a respective account, and each group having multipletablets and each tablet managed by a respective tablet server of thedistributed storage system, and a plurality of program modules, whereinthe plurality of program modules are stored in the memory of arespective computer server and to be executed by the one or moreprocessors of the respective computer server. The plurality of programmodules include instructions for: receiving a data access request from aclient, wherein the data access request includes a logical identifier ofdata associated with an account; identifying one or more splitidentifiers associated with the logical identifier in accordance withthe data access request, wherein each split identifier identifies asplit associated with the account; for each of the identified one ormore split identifiers: identifying a group identifier, wherein thegroup identifier corresponds to a group of splits; selecting one of themultiple tablets associated with the identified group based oninformation about the tablet servers managing the multiple tablets;communicating with the tablet server that manages the selected tabletfor the split corresponding to the split identifier; and receiving thesplit from the tablet server; and forwarding the splits from therespective tablet servers to the requesting client.

In accordance with some embodiments described below, a non-transitorycomputer readable storage medium stores one or more program modulesconfigured for execution by a computer server that includes one or moreprocessors and memory and is part of a distributed storage system,wherein the distributed storage system is configured for dividing dataassociated with a plurality of accounts into a plurality of groups, eachgroup including a plurality of splits, each split being associated witha respective account, and each group having multiple tablets and eachtablet managed by a respective tablet server of the distributed storagesystem. The one or more programs include instructions for: receiving adata access request from a client, wherein the data access requestincludes a logical identifier of data associated with an account;identifying one or more split identifiers associated with the logicalidentifier in accordance with the data access request, wherein eachsplit identifier identifies a split associated with the account; foreach of the identified one or more split identifiers: identifying agroup identifier, wherein the group identifier corresponds to a group ofsplits; selecting one of the multiple tablets associated with theidentified group based on information about the tablet servers managingthe multiple tablets; communicating with the tablet server that managesthe selected tablet for the split corresponding to the split identifier;and receiving the split from the tablet server; and forwarding thesplits from the respective tablet servers to the requesting client.

BRIEF DESCRIPTION OF DRAWINGS

The aforementioned implementation of the invention as well as additionalimplementations will be more clearly understood as a result of thefollowing detailed description of the various aspects of the inventionwhen taken in conjunction with the drawings. Like reference numeralsrefer to corresponding parts throughout the several views of thedrawings.

FIGS. 1A through 1G are block diagrams, each illustrating certainaspects of a distributed storage system in accordance with someembodiments.

FIGS. 2A and 2B are block diagram and flow chart illustrating how dataassociated with different accounts is replicated within the distributedstorage system in accordance with some embodiments.

FIGS. 3A and 3B are block diagram and flow chart illustrating how dataassociated with an account is added within the distributed storagesystem in accordance with some embodiments.

FIGS. 4A and 4B are block diagram and flow chart illustrating how datais located within the distributed storage system in response to a dataaccess request from a client in accordance with some embodiments.

FIG. 5 is a block diagram illustrating the components of the client inaccordance with some embodiments.

FIG. 6 is a block diagram illustrating the components of a front-endserver of the distributed storage system in accordance with someembodiments.

FIG. 7 is a block diagram illustrating the components of a zone of thedistributed storage system in accordance with some embodiments.

DETAILED DESCRIPTION

FIGS. 1A through 1G are block diagrams, each illustrating certainaspects of a distributed storage system in accordance with someembodiments. In particular, FIG. 1A depicts a distributed storage system100 according to some implementations of the present application. Thedistributed storage system 100 includes a plurality of zones 102-1,102-2, . . . 102-N at various locations across the world, connected bynetwork communication links 104-1,104-2, . . . 104-M. In someembodiments, a zone (such as the zone 1 102-1) corresponds to one ormore data centers that are geographically close to each other. Forexample, the North American region may correspond to one zone thatincludes two data centers, one located near the Pacific Coast and theother one located near the Atlantic Coast. Although the conceptualdiagram of FIG. 1A shows a limited number of network communication links104-1, etc., typical embodiments would have many more networkcommunication links. In some embodiments, there are two or more networkcommunication links between the same pair of zones, as illustrated bylinks 104-5 and 104-6 between the zone 2 (102-2) and the zone 6 (102-6).In some embodiments, the network communication links are composed offiber optic cable. In some embodiments, some of the networkcommunication links use wireless technology, such as microwaves. In someembodiments, each network communication link has a specified bandwidthand/or a specified cost for the use of that bandwidth. In someembodiments, each zone maintains the statistic information about thetransfer of data across one or more of the network communication linkswithin the distributed storage system 100, including throughput rate,times of availability, reliability of the links, etc.

FIG. 1B depicts the components of the distributed storage system 100according to some implementations of the present application. Thedistributed storage system 100 includes a universe master 106, one ormore front-end servers (101-1, . . . , 101-M), a placement driver 108,and a plurality of zones (102-1, 102-2, . . . , 102-N). The universemaster 106 and the placement driver 108 are responsible for monitoringthe performance of the system 100 and controlling the datareplication/migration between two zones. A zone (102-1, 102-2, . . . ,102-N) typically includes a data store (141-1, 141-2, . . . , 141-N)hosting a plurality of tablets (143-1, 143-2, . . . , 143-N), andutilizes a cluster of computer servers, including a zone master (131-1,131-2, . . . , 131-N), one or more location proxies (135-1, 135-2, . . ., 135-N), one or more tablet servers (133-1, 133-2, . . . , 133-N) toperform all of the tablet-related tasks. The data store (141-1, 141-2, .. . , 141-N) provides the underlying persistent storage space for datamanaged by a corresponding zone (102-1, 102-2, . . . , 102-N). In someembodiments, data within the data store (141-1, 141-2, . . . , 141-N)are organized into many tablets, which is a basic data unit handledwithin a particular zone. The zone master (131-1, 131-2, . . . , 131-N)is responsible for assigning each tablet in the data store (141-1,141-2, . . . , 141-N) to one of the tablet servers (133-1, 133-2, . . ., 133-N) for handling read/write requests directed at the tablet based,at least in part, on the CPU and memory usage at the tablet servers. Forexample, when the zone master determines that one tablet server isoverloaded, it may orchestrate the migration of some tablets from thisoverloaded tablet server to other tablet servers in the same zone ormaybe even another zone. A location proxy provides a location-lookupservice to another entity (e.g., a front-end server or a tablet server)such that, for a given tablet, the location proxy identifies arespective tablet server that has been chosen for handling the read andwrite requests directed at the tablet.

FIG. 1C illustrates in more detail how different components within azone coordinate with each other to perform various tablet-related tasksaccording to some implementations of the present application. In thisexample, the zone 102 includes a zone master 131, a plurality of tabletservers (133-1, 133-3), a plurality of location proxy servers (135-1,135-3), and a data store 141 that includes multiple tablets (141-A,141-B, . . . , 141-Z). The zone master 131 has a zone ID 131-1 thatuniquely identifies the zone 102 among a plurality of zones in adistributed storage system as shown in Figure IB. As will be describedbelow in connection with FIG. 1D, the zone ID is used by a front-endserver 101 for determining which zone includes the client-requesteddata. As described above, the location proxy servers (135-1, 135-3)provide a location-lookup service to other entities. In someembodiments, a location proxy server uses a lookup table to support thelocation-lookup service. FIG. 1C depicts an exemplary lookup table, eachrow of the table including a tablet ID 137-1 and a tablet server ID137-3. In response to a tablet ID provided by another entity, thelocation proxy server returns a tablet server ID to the requestingentity, which identifies a tablet server that is chosen by the zonemaster 131 for managing the corresponding tablet associated with thetablet ID. Accordingly, the requesting entity can communicate with theidentified tablet server with respect to tasks associated with thetablet. A tablet server 133-3 is identified by a tablet server ID 134-1and further includes tablet metadata 134-3 associated with the tabletsmanaged by the tablet server 133-3. For example, the tablet metadata134-3 includes the tablet IDs of the tablets managed by the tabletserver 133-3. In some embodiments, the tablet metadata 134-3 alsoincludes information about the splits associated with the tablet. A moredetailed description of the relationship between a split and a tablet isprovided below in connection with FIG. 1D.

In some embodiments, the zone master 131 monitors the performance of thetablet servers (133-1, 133-3) by periodically (e.g., after every 10seconds) communicating with the tablet servers (133-1, 133-3). A tabletserver reports to the zone master 131 its current status information,including its CPU and memory usage, etc., as well as other informationused for determining the association between a set of tablets and thetablet server. Based on such information, the zone master 131 determineswhether or not to assign a tablet in the data store 141 to acorresponding tablet server. For example, the zone master 131 mayidentify some tablets associated with one tablet server 133-3, which isdeemed to be overloaded, and assign the identified tablets to anothertablet server 133-1, In addition, the zone master 131 publishes theupdated tablet-to-tablet server map through the location proxy servers(135-1, 135-3), When another entity (e.g., a front-end server or atablet server) wants to learn which tablet server is responsible formanaging a particular tablet, the entity can query one of the locationproxy servers by providing a tablet ID and receiving a correspondingtablet server ID associated with the tablet ID. After identifying atablet server for a particular tablet through the location-lookupservice, the entity can communicate with the identified tablet serverfor any read/write access requests directed at the tablet.

FIG. 1D illustrates how different components within the distributedstorage system 100 interact with each other to satisfy data accessrequests from different clients according to some implementations of thepresent application. In this example, the clients (10-1, 10-2) areconnected to the distributed storage system 100 via a network 20 (e.g.,Internet) and they send requests for accessing data hosted by thedistributed storage system 100. In this application, the term “client”may refer to a client computer (e.g., a desktop/laptop computer or amobile device such as a tablet computer or a smartphone) from which anend user initiates a request for accessing a piece of data managed bythe distributed storage system 100. Alternatively, the term “client” mayrefer to a computer server that provides on-line services (e.g., emailor advertising) to multiple users and uses the distributed storagesystem 100 for hosting data associated with the on-line services. Ineither case, the distributed storage system 100 is responsible foridentifying and returning the client-requested data to the requestingclients upon receipt of such requests from the clients. For illustrativepurposes, it is assumed that one of the clients is an on-lineadvertising service provider and the distributed storage system 100hosts data associated with different customers of the on-lineadvertising service provider.

When the client wants to access data associated with a customer, itsubmits a data access request to a front-end server 101. In someembodiments, different front-end servers (shown in FIG. 1C) areresponsible for providing data-related services to different clients.For example, some of the front-end servers are configured for handlingdata access requests from clients for access email service data and someother front-end servers are configured for handling data access requestsfrom clients for access advertising service data. In some embodiments,data associated with an online service application is furtherpartitioned into multiple portions and each front-end server isconfigured for handling a subset of the data access requests for one ormore portions of the data. In some embodiments, the front-end servers ofthe distributed storage system are located at different geographicallocations to provide services to nearby clients that submit data accessrequests associated with different online services. As shown in FIG. 1D,a client submits a data access request by invoking an applicationprogramming interface (API) accepted by the front-end server 101. Thedata access request includes identification information of the one ormore customers. In some embodiments, the data associated with a customercorresponds to a row in a data table and the row of customer data isfurther divided into multiple columns. The data access request mayinclude a row identifier and possibly one or more column identifiers ifthe client is interested in accessing data in the one or more columnsassociated with each customer. Upon receipt of the data access request,the front-end server 101 needs to determine where the client-requesteddata is located in the distributed storage system 100 such asinformation about the zone and tablet(s) that have the client-requesteddata.

As shown in FIG. 1D, different components in the distributed storagesystem 100 are organized into two domains based on their respectiveroles: (i) the logical domain including the front-end servers (101-1,101-3) and (ii) the physical domain including the zones (102-1, 102-3).The front-end servers handle data access requests from the externalclients and use data structures such as the directory map 103-1 and thegroup map 103-3 to free the clients from understanding how data isphysically stored in the distributed storage system 100. In someembodiments, each customer of the on-line advertising service isassociated with one directory in the directory map 103-1. Based on thelogical directory identifier provided by a client, the front-end server101-1 identifies a particular entry in the director map 103-1, whichcorresponds to the particular customer.

To improve the scalability of the distributed storage system 100, dataassociated with a customer is divided into multiple segments, which arereferred to as “splits”, each split having a unique split ID in thedirectory map 103. As shown in FIG. 1D, each directory (e.g., directory105-1) includes one or more splits (107-1 and 107-3). The number ofsplits associated with a directory is determined by the size of dataassociated with a corresponding customer. The more data the customerhas, the more splits the data may be divided into. When the size of datawithin a split reaches a predefined threshold, no more data is added tothe split and a new split is generated for hosting new data associatedwith the account. In some embodiments, there is no limit on the size ofdata for an account. In other embodiments, the size of data for anaccount is set to a predetermined limit. The predetermined limit may bedetermined by the distributed storage system 100 (e.g., a global limitof the size of data that is applied to all accounts), the applicationfor which the data for the account is associated (e.g., a web mailapplication may impose a limit of the size of data for its accounts thatare different than an advertisement application), and/or may beincreased if an end user purchases more storage space for an account.Note that the client (i.e., the on-line advertising service provider)does not need to know which split(s) has the client-requested data.Instead, the client specifies the requested data in a request using aformat defined by the client-associated online service provider and thefront-end server 101-1 translates the client request into a set of splitIDs that identify the splits including the client-requested data.

To improve the reliability and efficiency of the distributed storagesystem 100, data associated with a customer is replicated into multiplecopies and stored in different tablets of one or more zones. In otherwords, the basic data unit for a particular customer in a front-endserver is a split and the basic data unit in a zone is a tablet. Asshown in FIG. 1D, a group in the group map 103-2 is defined to associatea split in the directory map 103-1 with a plurality of tablets in aparticular zone. In this example, the split 107-1 is a data structureassociating the split ID 108-1 with a group ID 108-7, which correspondsto an entry 109-1 in the group map 103-3. The split 107-1 also includesa split size 108-3 indicating the actual amount of data currently withinthis split range indicator 108-5. As will be described below, the datarange indicator is used for indicating whether the split has space formore data or not. When the split runs out of space, a new split (e.g.,split 107-3) will be created for hosting new data associated with theaccount. In this example, the split 107-3 is associated with the group109-3, not the group 109-1. Note that different splits associated withan account may belong to the same group of splits or different groups ofsplits. Each group includes a plurality (e.g., hundreds or eventhousands) of splits associated with different accounts and has apredefined group limit. The exact association between a split and agroup is dynamically determined based, in part, on the remainingcapacity of a particular group. In some embodiments, the front-endserver tries to add different splits associated with the same account tothe same group because these splits are likely to be accessed by aclient at the same time and it is probably more convenient for them tobe within the same group and therefore the same set of tablets, whichare replicas of the group. If the group (e.g., group 109-1) runs out ofspace, the front-end server may identify another group (e.g., group109-3) for the split 107-3. In some embodiments, the data replicationpolicy is defined for each account, the group 109-3 is chosen for thesplit 107-3 because it has the same number of tablets as the group109-1. In other words, splits associated with different accounts thathave different data replication policies should be added to differentgroups with different numbers of tablets.

In accordance with a data replication policy provided by the client, apredefined number of instances of the group are generated in thedistributed storage system 100, each instance of the group beingreferred to as a tablet. As shown in FIG. 1D, the group 109-1 has agroup ID 111-1 (which is the same as the group ID 108-7 in the split107-1), a group size 111-3, and a list of tablet IDs (e.g., tablet IDs113-1, 113-3) of the group. Splits associated with different directories(e.g., directory 105-1 and directory 105-3) both belong to the group109-1, suggesting that the two accounts corresponding to the twodirectories have the same data replication policy. In response to aclient request, the front-end server 101-1 first identifies one or moresplit IDs in the directory map 103-1, which are associated with acustomer identified by the client request, and then identifies a groupand an associated list of tablet IDs for each split ID. FIG. 1D depictan embodiment in which different splits (as identified by the split IDs107-1 and 107-3) associated with one customer are assigned to differentgroups (the group 109-1 and the group 109-3). This situation happenswhen the size of a group reaches a predefined group limit such that itis less efficient to keep all the data associated with one customer(e.g., multiple splits) in one group and therefore one tablet,

After the front-end server 101-1 identifies the tablet IDs in a group ofsplits that includes the client-requested data, the process of accessingthe client-requested data is shifted from the logical domain to thephysical domain, i.e., a zone that includes the tablets associated withthe identified tablet IDs. In some embodiments, a tablet ID (113-1 or113-3) includes a respective zone ID embedded therein. Therefore, afteridentifying the tablet IDs, the front-end server 101-1 also knows whichzone has the client-requested data. As noted above, each zone includesone or more location proxy servers that provide the location-look upservice for identifying a particular tablet server for each tablet.Based on the zone ID included in a tablet ID, the front-end server 101-1submits a query to a respective location proxy server at a particularzone identified by the zone ID, the query including one or more tabletIDs (113-1, 113-3). The location proxy server then returns one or moretablet server IDs, each tablet server ID identifying a respective tabletserver (e.g., the tablet server 125-1 or the tablet server 125-3) thathas been chosen by the zone master for managing the data access requeststo the particular tablet. Upon receipt of the one or more tablet serverIDs, the front-end sever 101-1 submits a request to a correspondingtablet server, the request including identification of one or moresplits (e.g., splits 123-1 and 123-3) within the tablet (e.g., thetablet 121-1). In response to the request, each tablet server identifiesa corresponding tablet in the data store and performs the operations tothe identified tablet accordingly.

FIG. 1E illustrates how the customer data of an on-line advertisingservice is divided into multiple splits according to some embodiments ofthe present application. The data table 108 illustrates how the customerdata is stored in a table-like data structure. As shown in the figure,each row 108-1 in the data table 108 represents the data associated witha particular customer whose customer ID is a primary key of the datarow. The data row 108-1 includes multiple columns. Some columns such asthe “Customer” column and the “Age” column each have one attribute valuewhereas some other columns include an embedded data structure (e.g., theembedded table 108-2). As shown in the figure, the data row 108-1 isdivided into multiple splits (123-A, 123-B, 123-C) to accommodate thecontinuing addition of new data to the row, each split including asubset of the data row. In some embodiments, the partition of datacolumns into different splits is based on the relationships betweendifferent columns. For example, columns that are often accessed togetherare put into one split for efficiency. An embedded table within aparticular column may be divided into multiple sections with eachsection belonging to one split as shown in FIG. 1E. As noted above, eachsplit has a split ID for uniquely identifying the split. In someembodiments, the split ID is content-addressable. For example, the splitID may include information about the customer ID associated with thedata row 108-1, the metadata associated with the split (e.g., the nameof the columns in the split), and the customer data stored within thesplit. With such content-addressable split ID definition, it is easy forthe front-end server to determine: (i) which split (and therefore acorresponding tablet) has the client-requested data based on theinformation in the client request and (ii) which split (and therefore acorresponding tablet) does not have the client-requested data and can beignored for the particular client request. As a result, the front-endserver only needs to communicate with a tablet server that isresponsible for managing the tablet. In some embodiments, the split IDincludes a range of string-like keys that correspond to a range of dataassociated with a customer.

Referring back to FIG. 1D, a tablet 121-1 may include splitscorresponding to multiple groups of splits (109-1, 109-3). By includingas many groups as possible within a tablet, the total number of tabletscan be reduced, which makes it easier to manage the transactionsdirected to different groups that are associated with the same tablet.For example, the reduction of tablets will consume lessmessages/resources for maintaining the relationship between differenttablets. There are fewer entities in the distributed storage system 100to deal with. With the reduction of tablets, transactions on a set ofneighboring directories in the directory map will likely be localized toa single set of tablets at a particular zone and will therefore beexecuted as a transaction at a single site (e.g., a tablet server)instead of transactions at multiple sites that might involve multipletablet servers. In some embodiments, the reduction of tablets makes itmore likely that a child director) is placed in the same group as itsparent directory. By doing so, a front-end server can direct a call tothe child directory to the location of the parent directory, whichreduces the size of the required location cache at the front-end serverand allows clients to start up faster since they will have to load fewerlocations. In some embodiments, the location of the parent directorydoes not correspond to the location of location of the child directory.In this case, if the client has a big payload, it may first send averification message to the tablet server that manages the tabletincluding the parent directory and determine if the child directory isco-located in the same tablet. Only after receiving a positiveconfirmation, will the client send its payload to the tablet server. Allthese performance benefits can significantly reduce the cost ofintroducing a new directory to the distributed storage system and makeit more likely that clients will map their structures to directoriesnaturally instead of trying to form larger directories.

As shown in FIG. 1D, a tablet server 125-1 further includes tabletmetadata 127-1 associated with tablets (121-1, 121-3) managed by thetablet server. In this example, the tablet metadata 127-1 includes adirectory-to-group map 127-3 and group state information 127-5. Thedirectory-to-group map 127-3 locates a particular group within a tabletfor a particular directory in the directory map. The group stateinformation 127-5 includes the state information for a particular groupreplica, such as the log data, view information, the list of groupreplicas, etc. Given a directory associated with a tablet, the tabletserver can scan the directory-to-group map for an entry that has thesame directory name. Once an entry is identified, the tablet server canaccess the corresponding group state information using a group ID withinthis entry. In some embodiments, the tablet server supports the removalof a range of directories from a tablet by eliminating data associatedwith each directory within the range from the tablet when removing adirectory replica from the tablet.

In some embodiments, one group in the distributed storage system may besplit into two or more groups for several reasons. For example, a tabletcontaining the group is overloaded or too large. In this case, splittingthe group may help reduce the load of the tablet if, e.g., this groupcontributes to a significant fraction of the load or size of the tablet.Sometimes, access patterns for some directories within a group are verydifferent from access patterns for the rest of the group. For example, agroup may be split into two if most directories in the group areaccessed from US, but a particular set of directories in the group aremostly accessed from Europe.

As shown in FIG. 1F, the directory set 151 is associated with the group155, which is a member of the tablet 157. It is assumed that thedirectory set 153, which is a subset of the directory set 151 before themovement, will be moved to another group. To do so, a new group iscreated within each of the same set of tablets that include the group155 by making a replica of the group 155. After the creation, the newgroup can be changed via the normal replica addition or removal. In thisexample, the group split is implemented as a single-site transaction onthe group 155 and the transaction update is applied at every replica ofthe group 155. As shown in FIG. 1F, at the completion of thetransaction, a new group 155-3 is created within the tablet 157 and theold group 155 is updated to the group 155-1 to reflect the group splitsuch that each directory in the new directory set 153-1 (whichcorresponds to the old directory set 153) is associated with the newgroup 155-3. The metadata associated with the new group 155-3 ispopulated such that it inherits at least a portion of the metadataassociated with the group 155-1, indicating that the relationshipbetween the two groups 155-1 and 155-3. By doing so, the metadataassociated with the group 155-1 (e.g., the list of tablet IDs) does notchange. It should be noted that splitting a group does not actually moveany user data associated with the group. This makes the split fastbecause the transaction cost is independent of the sizes of thedirectories being moved.

Note that splitting the group 155 within the tablet 157 does not affectany load at the tablet 157 because the new group 155-3 is within thesame tablet 157 as the original group. In order to move away some loadfrom the tablet 157, the tablet 157 needs to move some group to anothertablet. As shown in FIG. 1G, the tablet 157 includes two groups 155-1and 155-3, each group corresponding to a respective set of directories.In some embodiments, one group within a tablet is moved to anothertablet within the same zone by having the two tablets sharing some datawith each other. In some other embodiments, the target tablet (e.g., thetablet 157-1) reads directly from the source tablet (e.g., the tablet157) without going through a tablet server that is responsible formanaging the tablet 157. As such, the movement of groups between twotablets does not add additional load to the tablet server. Inconjunction with the movement of a group from one tablet to anothertablet, the mapping between a directory (e.g., a member in the directoryset 153-1) and a source tablet (e.g., the tablet 157) is updated toredirect to a target tablet (e.g., the tablet 157-1).

FIGS. 2A and 2B are block diagram and flow chart illustrating how dataassociated with different accounts is replicated within the distributedstorage system in accordance with some embodiments. As shown in FIG. 2B,a distributed storage system is provided (251) for managing the data 201associated with a plurality of accounts, including dividing the datainto a plurality of groups, each group including a plurality of splitsand each split being associated with a respective account. Inparticular, the data associated with a first account (e.g., the account201-1 in FIG. 2A) is divided (253) into a first set of splits (e.g., thesplits 203-1 and 203-3 in FIG. 2A) and the data associated with a secondaccount (e.g., the account 201-3 in FIG. 2A) is divided (253) into asecond set of splits (e.g., the split 203-5 in FIG. 2A). The distributedstorage system adds (255) each of the first set of splits to a group ofsplits (e.g., the group 205-1 in FIG. 2A) and adds each of the secondset of splits to a group of splits (e.g., the group 205-3 in FIG. 2A).In this example, it is assumed that the first account and second accounthave different data replication policies. For example, the first accountmay require that the distributed storage system create three replicasfor its data and allocate the three replicas in a zone corresponding toNorth America and the second account may require that the distributedstorage system create two replicas for its data and allocate the tworeplicas in a zone corresponding to Europe. Since the two accounts havedifferent policies, a member of the first set of splits cannot be addedto the group 205-3 that includes a member of the second set of splits.Similarly, a member of the second set of splits cannot be added to thegroup 205-1 that includes a member of the first set of splits. In otherwords, there is no group in the distributed storage system that includesboth a member of the first set of splits and a member of the second setof splits.

By allowing each account to have its own data replication policy, thedistribute storage system offers both flexibility and scalability todifferent types of online service applications that use the distributedstorage system for storing their data. For example, an account thatneeds frequent access to its data from one or more geographicallocations may specify such need in its data replication policy so thatthe distributed storage system may create more replicas for the dataassociated with the account at a zone close to the data accessinglocations and reduce the latency required for a client to access suchdata.

As shown in FIG. 2A, the distributed storage system creates (257 in FIG.2B) a predefined number (e.g., three) of replicas for each group ofsplits (e.g., the group 205-1) that includes a member of the first setof splits and allocates the three replicas in a zone (e.g., the zone207-1) in accordance with the data replication policy associated withthe first account. In this example, the zone 207-1 includes threetablets (209-1, 209-3, 209-5), each being one replica of the group205-1, and each tablet includes a copy of the first set of splitsassociated with the first account 201-1. As described above, each tabletin a zone is assigned to a tablet server for managing data accessrequests directed to the tablet. In this case, the three tablets aremanaged by two tablet servers 211-1 and 211-3. In other words, tabletsassociated with the same group of splits may be managed by the sametablet server or different tablet servers depending on the load balanceof the respective tablet servers in a zone. Similarly, the distributedstorage system creates (259 in FIG. 2B) a predefined number (e.g., two)of replicas for each group of splits (e.g., the group 205-3) thatincludes a member of the second set of splits and allocates the replicasin a zone (e.g., the zone 207-3) in accordance with the data replicationpolicy associated with the second account. In this example, the zone207-3 includes two tablets (209-7, 209-9), each being a replica of thegroup 205-3, and each tablet includes a copy of the second set of splitsassociated with the second account 201-3 and is managed by a respectivetablet server (211-5 or 211-7). It should be noted that the datareplication policy of a group of splits is driven by the datareplication policies of the different splits in the group, which aredriven by the data replication policies of the accounts associated withthe different splits. The distributed storage system is responsible forputting those splits having the same or similar data replicationpolicies into the same group to improve the system's efficiency. In someembodiments, the enforcement of the account-level (or directory-level)data replication policy is determined by the distributed storage systembased on the availability of resources at different zones. In otherwords, it is possible that the distributed storage system may not alwaysstore splits associated with a particular account strictly in accordancewith the account's data replication policy. For example, the splits maybe initially stored in a zone different from a zone defined by theaccount's data replication policy and then moved to the zone. In thiscase, the distributed storage system allows an account to specify itsdesired placement of the splits associated with, the account in thedirectory map and will try to satisfy such requirement whenever it ispossible. In some embodiments, an account, may change its datareplication policy from time to time. For example, an email account usermay temporarily move from North America to Europe. When the emailapplication detects such movement, it. may notify the distributedstorage system to move tablets associated with the email account from adata center in North America to a data center in Europe to provide abetter service to the end user.

FIGS. 3A and 3B are block diagram and flow chart illustrating how dataassociated with an account is added within the distributed storagesystem in accordance with some embodiments. As noted above, the divisionof an account's data into one or more splits eliminates the data limitfor a particular account managed by the distributed storage systembecause the distributed storage system can add new splits to an accountwhen its existing split runs out of space. As shown in FIG. 3B, adistributed storage system is provided (351) for managing the data 301associated with a plurality of accounts, including dividing the datainto a plurality of groups, each group including a plurality of splitsand each split being associated with a respective account. Inparticular, the data associated with an account (e.g., the account 301-1in FIG. 3A) initially includes only one (e.g., the split 303 in FIG.2A). As described above in connection with FIGS. 2A and 2B, this splitis added to a group of splits and replicated within a particular zone aspart of a set of tablets associated with the group in accordance withthe data replication policy. As shown in FIG. 3B, the distributedstorage system identities (353) a first split (e.g., the split 303 inFIG. 3A) associated with the account. In this example, the first splitis the split 303 that includes multiple parameters including the datarange parameter 303-1 and the split size parameter 303-3. Note that thevalue <inf> of the data range parameter 303-1 indicates that the split303 still has space for more data to be added to the split and the splitsize parameter 303-3 represents the actual amount of data in the split303.

In some embodiments, each account has only one split whose data rangeparameter has a value of <inf>. As shown in FIG. 3B, the distributedstorage system determines (355) whether the split associated with theaccount reaches its limit according to a predefined schedule (e.g.,periodically). If not (355—no), the distributed storage system stopschecking this account and proceeds to check another account. Otherwise(355—yes), the distributed storage system will take further actions bycreating a new split for the account.

As shown in FIG. 3A, when the existing split 303 runs out of space, thedistributed storage system updates (357) the data range parameter in thesplit 303 from <inf> to “ABC.” Note that the expression “ABC” is anexpression that corresponds to the actual upper limit of the data withinthe split 303. From this parameter, the distributed storage system cantell what data is within each split. In response to a client request fora particular piece of data, the distributed storage system can use thedata range parameter to determine which split or splits have theclient-requested data. By doing so, the distributed storage system alsomarks the first split as not accepting any new data. The distributedstorage system then creates (359) a second split (e.g., the split 305 inFIG. 3B) for the account. As shown in FIG. 3B, the second split 305includes a data range parameter 305-1 that has a value of <inf>indicating that more data can be added to the second split and a splitsize parameter 305-3 that grows as more and more data is added to thesecond split 305. Moreover, the distributed storage system selects asecond group of splits (e.g., the group 307 in FIG. 3A) for the secondsplit 305 and adds (361) the second split to a second group of splits.It should be noted that the second group 307 may be the same group thatincludes the split 303 or a different one. Finally, the distributedstorage system replicates (363) the second group of splits in aparticular zone (e.g., the zone 309 in FIG. 3A) in accordance with adata replication policy associated with the account. In this example,the second group 307 has two tablets (311-1, 311-3) in the zone 309,which are managed by two respective tablet servers 313-1 and 313-3. Insome embodiments, the creation of a new split for an account may betriggered by the movement of data within the distributed storage system,e.g., in response to a change of the data replication policy. In eithercase, the creation of new splits for the account ensures that the clientcan add more data to this account without disrupting the serviceassociated with the account.

FIGS. 4A and 4B are block diagram and flow chart illustrating how datais located within the distributed storage system in response to a dataaccess request from a client in accordance with some embodiments. Asshown in FIG. 4B, a distributed storage system is provided (451) formanaging data associated with a plurality of accounts, which is dividedinto a plurality of groups, each group including a plurality of splits,each split being associated with a respective account, and each grouphaving multiple tablets and each tablet managed by a respective tabletserver of the distributed storage system. A front-end server (403 inFIG. 4A) of the distributed storage system receives (453) a data accessrequest from a client (401 in FIG. 4A). In some embodiments, the dataaccess request includes a logical identifier (e.g., a directoryidentifier) of data associated with an account associated with theclient.

In response, the front-end server (403 in FIG. 4A) identities (455) oneor more split identifiers associated with the logical identifier inaccordance with the data access request. As shown in FIG. 4A, thefront-end server 403 identified two splits within the directory map 405,they are the split 407-1 and the split 407-3. Each split's metadataincludes a split ID (409-1, 409-5) that identifies a split associatedwith the account. For each of the identified one or more splitidentifiers (457), the front-end server 403 identifies (457-1) a groupidentifier (e.g., the group IDs 409-3 and 409-7 in FIG. 4A), each groupidentifier corresponds to a group of splits. In the example shown inFIG. 4A, the group ID 409-3 corresponds to the group 411 of splits thatincludes a split 411-1 corresponding to the split 407-1 in the directormap 405 and the group ID 409-7 corresponds to the group 413 of splitsthat includes a split 413-1 corresponding to the split 407-3 in thedirectory map 405. The distributed storage system selects (457-3) one ofthe multiple tablets associated with each identified group based oninformation about the tablet servers managing the multiple tablets. Forexample, the zone 415 includes two tablets associated with each of thetwo identified groups 411 and 413. In particular, the tablet 417 isidentified for the group 411 and the tablet 417 includes a split 417-1that corresponds to the split 407-1 in the directory map 405. The tablet421 is identified for the group 413 and the tablet 421 includes a split421-1 that corresponds to the split 407-3 in the directory map 405. Foreach selected tablet, there is a corresponding tablet, server in thezone 415 that is responsible for managing data access requests to thetablet. In this example, the tablet server 419 is responsible formanaging the tablet 417 and the tablet server 423 is responsible formanaging the tablet 421. After identifying each tablet server, thefront-end server 403 communicates (457-5) with the tablet server thatmanages the selected tablet for the split corresponding to the splitidentifier for the split associated with the client request and receives(457-7) the split from the tablet server. After receiving the splitsfrom different, tablet servers, the front-end server forwards (459) thesplits from the respective tablet servers to the requesting client insatisfying the client's data access request. It should be noted that theclient access request may be a read-only request or a read-and-writerequest. Since each group of splits includes multiple tablets, any dataupdate to one split within the group should be replicated within eachtablet associated with the group.

FIG. 5 is a block diagram illustrating the components of the client inaccordance with some embodiments. The client 10 is a computer serverthat includes one or more processing units (CPU's) 502 for executingmodules, programs and/or instructions stored in the memory 514 andthereby performing processing operations; one or more network or othercommunications interfaces 504; memory 514; and one or more communicationbuses 512 for interconnecting these components. In some implementations,the client 10 includes a user interface 406 comprising a display device508 and one or more input devices 510 (e.g., keyboard or mouse or remotecontrol). In some implementations, the memory 514 includes high-speedrandom access memory, such as DRAM, SRAM, DDR RAM or other random accesssolid state memory devices. In some implementations, memory 514 includesnon-volatile memory, such as one or more magnetic disk storage devices,optical disk storage devices, flash memory devices, or othernon-volatile solid state storage devices. In some implementations,memory 514 includes one or more storage devices remotely located fromthe CPU(s) 502. Memory 514, or alternately the non-volatile memorydevice(s) within memory 514, comprises a non-transitory computerreadable storage medium. In some implementations, memory 514 or thenon-transitory computer readable storage medium of memory 514 stores thefollowing elements, or a subset of these elements, and may also includeadditional elements:

-   -   an operating system 516 that includes procedures for handling        various basic system services and for performing hardware        dependent tasks;    -   a network communications module 518 that is used for coupling        the client 10 to the distributed storage system 100 via the        communication network interfaces 504 and one or more        communication networks (wired or wireless), such as the network        20, other wide area networks, local area networks, metropolitan        area networks, and so on; and    -   one or more online service applications 520, such as an online        email application 522 that includes a data access module 522-1        for communicating with the distributed storage system 100 for        exchanging data, an online advertising application 524 that        includes a data access module 524-1 for communicating with the        distributed storage system 100 for exchanging data, etc.

FIG. 6 is a block diagram illustrating the components of a front-endserver of the distributed storage system in accordance with someembodiments. The front-end server 101 includes one or more processingunits (CPU's) 602 for executing modules, programs and/or instructionsstored in the memory 614 and thereby performing processing operations;one or more network or other communications interfaces 604; memory 614;and one or more communication buses 612 for interconnecting thesecomponents. In some implementations, the front-end server 101 includesan optional user interface 606 comprising a display device 608 and oneor more input devices 610 (e.g., keyboard or mouse or remote control).In some implementations, the memory 614 includes high-speed randomaccess memory, such as DRAM, SRAM, DDR RAM or other random access solidstate memory devices. In some implementations, memory 614 includesnon-volatile memory, such as one or more magnetic disk storage devices,optical disk storage devices, flash memory devices, or othernon-volatile solid state storage devices. In some implementations,memory 614 includes one or more storage devices remotely located fromthe CPU(s) 602. Memory 614, or alternately the non-volatile memorydevice(s) within memory 614, comprises a non-transitory computerreadable storage medium. In some implementations, memory 614 or thenon-transitory computer readable storage medium of memory 614 stores thefollowing elements, or a subset of these elements, and may also includeadditional elements:

-   -   an operating system 616 that includes procedures for handling        various basic system services and for performing hardware        dependent tasks;    -   a network communications module 618 that is used for connecting        the front-send server 101 to other devices (e.g., the clients 10        and the other components in the distributed storage system 100        such as the zones) via the communication network interfaces 604        and one or more communication networks (wired or wireless), such        as the network 20, other wide area networks, local area        networks, metropolitan area networks, and so on;    -   a plurality of application interface modules 620, such as an        online email application module 622 for exchanging data with the        data access module 522-1 in the client 10, an online advertising        application module 624 for exchanging data with the data access        module 524-1 in the client 10, etc;    -   a plurality of directory maps 626, such as an online email        application directory map 628 including a plurality of records        630 defining the relationship between different email accounts        with their respective splits in the distributed storage system,        an online advertising application directory map 632 including a        plurality of records 634 defining the relationship between        different advertising customer accounts with their respective        splits in the distributed storage system, etc; and    -   a plurality of group maps 636, such as an online email        application directory map 638 including a plurality of records        640 defining the relationship between different groups with        their respective sets of tablets in the distributed storage        system, an online advertising application directory map 642        including a plurality of records 644 defining the relationship        between different groups with their respective sets of tablets        in the distributed storage system, etc.

FIG. 7 is a block diagram illustrating the components of a zone of thedistributed storage system in accordance with some embodiments. The zoneservers 102 include one or more processing units (CPU's) 702 forexecuting modules, programs and/or instructions stored in the memory 714and thereby performing processing operations; one or more network orother communications interfaces 704; memory 714; and one or morecommunication buses 712 for interconnecting these components. In someimplementations, the zone servers 102 includes an optional userinterface 706 comprising a display device 708 and one or more inputdevices 710 (e.g., keyboard or mouse or remote control). In someimplementations, the memory 714 includes high-speed random accessmemory, such as DRAM, SRAM, DDR RAM or other random access solid statememory devices. In some implementations, memory 714 includesnon-volatile memory, such as one or more magnetic disk storage devices,optical disk storage devices, flash memory devices, or othernon-volatile solid state storage devices. In some implementations,memory 714 includes one or more storage devices remotely located fromthe CPU(s) 702. Memory 714, or alternately the non-volatile memorydevice(s) within memory 714, comprises a non-transitory computerreadable storage medium. In some implementations, memory 714 or thenon-transitory computer readable storage medium of memory 714 stores thefollowing elements, or a subset of these elements, and may also includeadditional elements:

-   -   an operating system 716 that includes procedures for handling        various basic system services and for performing hardware        dependent tasks;    -   a network communications module 718 that is used for connecting        the zone servers 102 to other devices (e.g., the front-end        servers 101) via the communication network interfaces 704 and        one or more communication networks (wired or wireless), such as        the network links 104, other wide area networks, local area        networks, metropolitan area networks, and so on;    -   a zone master server 719 for managing the location proxy servers        720 and the tablet servers 728 within each zone;    -   a plurality of location proxy servers 720, each server (722,        726) further including a location-lookup table 724 for        identifying a map between a respective tablet and a respective        tablet server;    -   a plurality of tablet servers 728, each server (730, 734)        further including tablet metadata 732 for managing a plurality        of tablets such as the data access requests directed to the        tablets; and    -   a plurality of tablets 736, each tablet (738, 744) further        including a tablet description 740 and a plurality of splits        742.

Reference has been made in detail to implementations, examples of whichare illustrated in the accompanying drawings. While particularimplementations are described, it will be understood it is not intendedto limit the invention to these particular implementations. On thecontrary, the invention includes alternatives, modifications andequivalents that are within the spirit and scope of the appended claims.Numerous specific details are set forth in order to provide a thoroughunderstanding of the subject matter presented herein. But it will beapparent to one of ordinary skill in the art that the subject matter maybe practiced without these specific details. In other instances,well-known methods, procedures, components, and circuits have not beendescribed in detail so as not to unnecessarily obscure aspects of theimplementations.

Although the terms first, second, etc. may be used herein to describevarious elements, these elements should not be limited by these terms.These terms are only used to distinguish one element from another. Forexample, first ranking criteria could be termed second ranking criteria,and, similarly, second ranking criteria could be termed first rankingcriteria, without departing from the scope of the present invention.First ranking criteria and second ranking criteria are both rankingcriteria, but they are not the same ranking criteria.

The terminology used in the description of the invention herein is forthe purpose of describing particular implementations only and is notintended to be limiting of the invention. As used in the description ofthe invention and the appended claims, the singular forms “a,” “an,” and“the” are intended to include the plural forms as well, unless thecontext clearly indicates otherwise. It will also be understood that theterm “and/or” as used herein refers to and encompasses any and allpossible combinations of one or more of the associated listed items. Itwill be further understood that the terms “includes,” “including,”“comprises,” and/or “comprising,” when used in this specification,specify the presence of stated features, operations, elements, and/orcomponents, but do not preclude the presence or addition of one or moreother features, operations, elements, components, and/or groups thereof.

As used herein, the term “if” may be construed to mean “when” or “upon”or “in response to determining” or “in accordance with a determination”or “in response to detecting,” that a stated condition precedent istrue, depending on the context. Similarly, the phrase “if it isdetermined [that a stated condition precedent is true]” or “if [a statedcondition precedent is true]” or “when [a stated condition precedent istrue]” may be construed to mean “upon determining” or “in response todetermining” or “in accordance with a determination” or “upon detecting”or “in response to detecting” that the stated condition precedent istrue, depending on the context.

Although some of the various drawings illustrate a number of logicalstages in a particular order, stages that are not order dependent may bereordered and other stages may be combined or broken out. While somereordering or other groupings are specifically mentioned, others will beobvious to those of ordinary skill in the art and so do not present anexhaustive list of alternatives. For example, it is possible for afront-end server to return a split associated with an account to aclient in its native format used by the distributed storage system andthe client then converts the raw split into a format defined by theclient. Moreover, it should be recognized that the stages could beimplemented in hardware, firmware, software or any combination thereof.

The foregoing description, for purpose of explanation, has beendescribed with reference to specific implementations. However, theillustrative discussions above are not intended to be exhaustive or tolimit the invention to the precise forms disclosed. Many modificationsand variations are possible in view of the above teachings. Theimplementations were chosen and described in order to best explainprinciples of the invention and its practical applications, to therebyenable others skilled in the art to best utilize the invention andvarious implementations with various modifications as are suited to theparticular use contemplated. Implementations include alternatives,modifications and equivalents that are within the spirit and scope ofthe appended claims. Numerous specific details are set forth in order toprovide a thorough understanding of the subject matter presented herein.But it will be apparent to one of ordinary skill in the art that thesubject matter may be practiced without these specific details. In otherinstances, well-known methods, procedures, components, and circuits havenot been described in detail so as not to unnecessarily obscure aspectsof the implementations.

What is claimed is:
 1. A computer-implemented method, comprising: at acomputer server including one or more processors and memory: providing adistributed storage system, wherein data within the distributed storagesystem is associated with a plurality of accounts and divided into aplurality of groups, each group including a plurality of splits and eachsplit being associated with a respective account; dividing dataassociated with a first account and data associated with a secondaccount into a first set of splits and a second set of splits,respectively, wherein the first account and the second account havedifferent data replication policies; adding each of the first set ofsplits and the second set of splits to a respective group of splits,wherein there is no group including a member of the first set of splitsand a member of the second set of splits; creating a first predefinednumber of replicas for each group of splits that includes a member ofthe first set of splits and allocating the replicas within thedistributed storage system in accordance with a first data replicationpolicy associated with the first account; and creating a secondpredefined number of replicas for each group of splits that includes amember of the second set of splits and allocating the replicas withinthe distributed storage system in accordance with a second datareplication policy associated with the second account.
 2. Thecomputer-implemented method of claim 1, wherein the first account andthe second account are associated with one application that uses thedistributed storage system for storing data associated with theapplication.
 3. The computer-implemented method of claim 1, wherein thefirst account and the second account are associated with two respectiveapplications, each respective application using the distributed storagesystem for storing data associated with the respective application. 4.The computer-implemented method of claim 1, wherein the data replicationpolicy associated with the first account includes information thatspecifies a number of replicas and their respective locations for eachof the first set of splits.
 5. The computer-implemented method of claim1, wherein members of the first set of splits are added to two or moregroups of splits and members of the second set of splits are added toone group of splits.
 6. The computer-implemented method of claim 5,wherein the one group of splits corresponding to the second set ofsplits is replicated within two or more zones of the distributed storagesystem according to the data replication policy associated with thesecond account.
 7. The computer-implemented method of claim 1, whereinthe first predefined number of replicas is different from the secondpredefined number of replicas.
 8. A distributed storage system,comprising: a plurality of zones, each zone including a plurality ofcomputer servers and each computer server including one or moreprocessors and memory; a plurality of network links that connects tworespective zones, wherein data within the distributed storage system isassociated with a plurality of accounts and divided into a plurality ofgroups, each group including a plurality of splits and each split beingassociated with a respective account; and a plurality of programmodules, wherein the plurality of program modules are stored in thememory of a respective computer server and to be executed by the one ormore processors of the respective computer server, and the plurality ofprogram modules include instructions for: dividing data associated witha first account and data associated with a second account into a firstset of splits and a second set of splits, respectively, wherein thefirst account and the second account have different data replicationpolicies; adding each of the first set of splits and the second set ofsplits to a respective group of splits, wherein there is no groupincluding a member of the first set of splits and a member of the secondset of splits; creating a predefined number of replicas for each groupof splits that includes a member of the first set of splits andallocating the replicas within the distributed storage system inaccordance with a data replication policy associated with the firstaccount; and creating a predefined number of replicas for each group ofsplits that includes a member of the second set of splits and allocatingthe replicas within the distributed storage system in accordance with adata replication policy associated with the second account.
 9. Thedistributed storage system of claim 8, wherein the first account and thesecond account are associated with one application that uses thedistributed storage system for storing data associated with theapplication.
 10. The distributed storage system of claim 8, wherein thedata replication policy associated with the first account includesinformation that specifies a number of replicas and their respectivelocations for each of the first set of splits.
 11. The distributedstorage system of claim 8, wherein members of the first set of splitsare added to two or more groups of splits and members of the second setof splits are added to one group of splits.
 12. The distributed storagesystem of claim 11, wherein the one group of splits corresponding to thesecond set of splits is replicated within two or more zones of thedistributed storage system according to the data replication policyassociated with the second account.
 13. The distributed storage systemof claim 8, wherein the first predefined number of replicas is differentfrom the second predefined number of replicas.
 14. A non-transitorycomputer readable storage medium storing one or more program modulesconfigured for execution by a computer server that includes one or moreprocessors and memory and is part of a distributed storage system,wherein the distributed storage system is configured for dividing dataassociated with a plurality of accounts into a plurality of groups, eachgroup including a plurality of splits and each split being associatedwith a respective account, the one or more programs comprisinginstructions for: dividing data associated with a first account and dataassociated with a second account into a first set of splits and a secondset of splits, respectively, wherein the first account and the secondaccount have different data replication policies; adding each of thefirst set of splits and the second set of splits to a respective groupof splits, wherein there is no group including a member of the first setof splits and a member of the second set of splits; creating apredefined number of replicas for each group of splits that includes amember of the first set of splits and allocating the replicas within thedistributed storage system in accordance with a data replication policyassociated with the first account; and creating a predefined number ofreplicas for each group of splits that includes a member of the secondset of splits and allocating the replicas within the distributed storagesystem in accordance with a data replication policy associated with thesecond account.
 15. The non-transitory computer readable storage mediumof claim 14, wherein the first account and the second account areassociated with one application that uses the distributed storage systemfor storing data associated with the application.
 16. The non-transitorycomputer readable storage medium of claim 14, wherein the datareplication policy associated with the first account includesinformation that specifies a number of replicas and their respectivelocations for each of the first set of splits.
 17. The non-transitorycomputer readable storage medium of claim 14, wherein members of thefirst set of splits are added to two or more groups of splits andmembers of the second set of splits are added to one group of splits.18. The non-transitory computer readable storage medium of claim 17,wherein the one group of splits corresponding to the second set ofsplits is replicated within two or more zones of the distributed storagesystem according to the data replication policy associated with thesecond account.
 19. The non-transitory computer readable storage mediumof claim 14, wherein the first predefined number of replicas isdifferent from the second predefined number of replicas.
 20. Acomputer-implemented method, comprising: at a computer server includingone or more processors and memory: providing a distributed storagesystem, wherein data within the distributed storage system is associatedwith a plurality of accounts and divided into a plurality of groups,each group including a plurality of splits and each split beingassociated with a respective account; identifying a first splitassociated with an account, wherein the first split is a member of afirst group of splits and the first split has a data range parameterindicating that more data can be added to the first split and a splitsize indicating an actual amount of data in the first split; in responseto determining that the split size of the first split has reached apredefined limit: updating the data range parameter in the first splitso that no additional data can be added to the first split; creating asecond split for the account, wherein the second split includes a datarange parameter indicating that more data can be added to the secondsplit; adding the second split to a second group of splits; andreplicating the second group of splits within the distributed storagesystem in accordance with a data replication policy associated with theaccount.